//
//  HYReserveSeatInfoTableViewCell.m
//  Booking
//
//  Created by Maybe_文仔 on 2018/9/13.
//  Copyright © 2018年 Duntech. All rights reserved.
//

#import "HYReserveSeatInfoTableViewCell.h"
#import "HYSeatCellModel.h"

@interface HYReserveSeatInfoTableViewCell()
@property (weak, nonatomic) IBOutlet UILabel *addressLab;
@property (weak, nonatomic) IBOutlet UILabel *timeLab;

@end

@implementation HYReserveSeatInfoTableViewCell

-(void)configWithModel:(id)model{
    HYSeatCellModel *cellModel = (HYSeatCellModel *)model;
    
    self.addressLab.text = [NSString stringWithFormat:@"%@ %@ %@ %@ ",cellModel.cityName,cellModel.buildName,cellModel.floorName,cellModel.name];
    
    NSDate *date = [HYDateHandle dateFromString:cellModel.meetingDate format:@"yyyy-MM-dd"];
    NSString *weekDay = [HYDateHandle weekStrFromDate:date];
    self.timeLab.text = [NSString stringWithFormat:@"%@，%@ %@-%@",weekDay,cellModel.meetingDate,cellModel.startTime,cellModel.endTime];
}

- (IBAction)deleteAction:(id)sender {
    if (self.deleteBlock) {
        self.deleteBlock();
    }
}

- (IBAction)editAction:(id)sender {
    if (self.editBlock) {
        self.editBlock();
    }
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
